{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Title: #People Whose List of Favorite Companies Is Not a Subset of Another List"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Difficulty: #Medium"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Category Title: #Algorithms"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Tag Slug: #array #hash-table #string"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Name Translated: #数组 #哈希表 #字符串"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Solution Name: peopleIndexes"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Translated Title: #收藏清单"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Translated Content:\n",
    "<p>给你一个数组 <code>favoriteCompanies</code> ，其中 <code>favoriteCompanies[i]</code> 是第 <code>i</code> 名用户收藏的公司清单（<strong>下标从 0 开始</strong>）。</p>\n",
    "\n",
    "<p>请找出不是其他任何人收藏的公司清单的子集的收藏清单，并返回该清单下标<em>。</em>下标需要按升序排列<em>。</em></p>\n",
    "\n",
    "<p>&nbsp;</p>\n",
    "\n",
    "<p><strong>示例 1：</strong></p>\n",
    "\n",
    "<pre><strong>输入：</strong>favoriteCompanies = [[&quot;leetcode&quot;,&quot;google&quot;,&quot;facebook&quot;],[&quot;google&quot;,&quot;microsoft&quot;],[&quot;google&quot;,&quot;facebook&quot;],[&quot;google&quot;],[&quot;amazon&quot;]]\n",
    "<strong>输出：</strong>[0,1,4] \n",
    "<strong>解释：</strong>\n",
    "favoriteCompanies[2]=[&quot;google&quot;,&quot;facebook&quot;] 是 favoriteCompanies[0]=[&quot;leetcode&quot;,&quot;google&quot;,&quot;facebook&quot;] 的子集。\n",
    "favoriteCompanies[3]=[&quot;google&quot;] 是 favoriteCompanies[0]=[&quot;leetcode&quot;,&quot;google&quot;,&quot;facebook&quot;] 和 favoriteCompanies[1]=[&quot;google&quot;,&quot;microsoft&quot;] 的子集。\n",
    "其余的收藏清单均不是其他任何人收藏的公司清单的子集，因此，答案为 [0,1,4] 。\n",
    "</pre>\n",
    "\n",
    "<p><strong>示例 2：</strong></p>\n",
    "\n",
    "<pre><strong>输入：</strong>favoriteCompanies = [[&quot;leetcode&quot;,&quot;google&quot;,&quot;facebook&quot;],[&quot;leetcode&quot;,&quot;amazon&quot;],[&quot;facebook&quot;,&quot;google&quot;]]\n",
    "<strong>输出：</strong>[0,1] \n",
    "<strong>解释：</strong>favoriteCompanies[2]=[&quot;facebook&quot;,&quot;google&quot;] 是 favoriteCompanies[0]=[&quot;leetcode&quot;,&quot;google&quot;,&quot;facebook&quot;] 的子集，因此，答案为 [0,1] 。\n",
    "</pre>\n",
    "\n",
    "<p><strong>示例 3：</strong></p>\n",
    "\n",
    "<pre><strong>输入：</strong>favoriteCompanies = [[&quot;leetcode&quot;],[&quot;google&quot;],[&quot;facebook&quot;],[&quot;amazon&quot;]]\n",
    "<strong>输出：</strong>[0,1,2,3]\n",
    "</pre>\n",
    "\n",
    "<p>&nbsp;</p>\n",
    "\n",
    "<p><strong>提示：</strong></p>\n",
    "\n",
    "<ul>\n",
    "\t<li><code>1 &lt;=&nbsp;favoriteCompanies.length &lt;= 100</code></li>\n",
    "\t<li><code>1 &lt;=&nbsp;favoriteCompanies[i].length &lt;= 500</code></li>\n",
    "\t<li><code>1 &lt;=&nbsp;favoriteCompanies[i][j].length &lt;= 20</code></li>\n",
    "\t<li><code>favoriteCompanies[i]</code> 中的所有字符串 <strong>各不相同</strong> 。</li>\n",
    "\t<li>用户收藏的公司清单也 <strong>各不相同</strong> ，也就是说，即便我们按字母顺序排序每个清单， <code>favoriteCompanies[i] != favoriteCompanies[j] </code>仍然成立。</li>\n",
    "\t<li>所有字符串仅包含小写英文字母。</li>\n",
    "</ul>\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Description: [people-whose-list-of-favorite-companies-is-not-a-subset-of-another-list](https://leetcode.cn/problems/people-whose-list-of-favorite-companies-is-not-a-subset-of-another-list/description/)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Solutions: [people-whose-list-of-favorite-companies-is-not-a-subset-of-another-list](https://leetcode.cn/problems/people-whose-list-of-favorite-companies-is-not-a-subset-of-another-list/solutions/)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "test_cases = ['[[\"leetcode\",\"google\",\"facebook\"],[\"google\",\"microsoft\"],[\"google\",\"facebook\"],[\"google\"],[\"amazon\"]]', '[[\"leetcode\",\"google\",\"facebook\"],[\"leetcode\",\"amazon\"],[\"facebook\",\"google\"]]', '[[\"leetcode\"],[\"google\"],[\"facebook\"],[\"amazon\"]]']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "from functools import reduce\n",
    "def to_num(list:List[int]) -> int:\n",
    "    return reduce(lambda x, y: x | y, map(lambda x: 1<<x, list))\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = 0\n",
    "        map2n = dict()\n",
    "        def add(x):\n",
    "            nonlocal n, map2n\n",
    "            if x not in map2n:\n",
    "                map2n[x] = n\n",
    "                n += 1\n",
    "            return map2n[x]\n",
    "        result = []\n",
    "        for j in range(len(favoriteCompanies)):\n",
    "            f = favoriteCompanies[j]\n",
    "            index = to_num(map(add, f))\n",
    "            favoriteCompanies[j] = index\n",
    "            for i in range(len(result)):\n",
    "                if result[i] < 0:\n",
    "                    continue\n",
    "                if favoriteCompanies[i] > index and favoriteCompanies[i] | index == favoriteCompanies[i]:\n",
    "                    result.append(-1)\n",
    "                    break\n",
    "                elif favoriteCompanies[i] <= index and favoriteCompanies[i] | index == index:\n",
    "                    result[i] = -1\n",
    "            else:\n",
    "                result.append(len(result))\n",
    "        return list(filter(lambda x: x >= 0, result))\n",
    "                    \n",
    "                    \n",
    "                    \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        f = list(set(a) for a in favoriteCompanies)\n",
    "        res = []\n",
    "        for i in range(n):\n",
    "            flag = True\n",
    "            for j in range(n):\n",
    "                if i != j and len(f[i]) < len(f[j]):\n",
    "                  if f[i].issubset(f[j]):\n",
    "                    flag = False\n",
    "                    break\n",
    "            if flag:\n",
    "                res.append(i)\n",
    "        return res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        res = []\n",
    "        n = len(favoriteCompanies)\n",
    "        favoriteCompanies = list(set(f) for f in favoriteCompanies)\n",
    "        for i in range(n):\n",
    "            for j in range(n):\n",
    "                if i != j and favoriteCompanies[i].issubset(\n",
    "                        favoriteCompanies[j]):\n",
    "                    break\n",
    "            else:\n",
    "                res.append(i)\n",
    "        return res\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        giad = [set(i) for i in favoriteCompanies]\n",
    "        tops = set(range(n))\n",
    "        for i in range(n):\n",
    "            for j in range(n):\n",
    "                if i in tops and i != j and giad[i].issubset(giad[j]):\n",
    "                    tops.remove(i)\n",
    "        return list(tops)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        compSets = [set(favList) for favList in favoriteCompanies] # list转化为set，节省后续时间\n",
    "        tops = set(range(n)) # 如果一个下标在tops内，说明他此时没被判定为其他用户的子集\n",
    "\n",
    "        for i in range(n):\n",
    "            if i not in tops: continue # 当前用户的清单已是之前的清单的子集了，不用继续考虑他\n",
    "            for j in range(i+1, n): # 与i之前用户的子集关系已经在之前用户的外层循环检查过了，只需往i后检查\n",
    "                if j not in tops: continue\n",
    "                if i in tops and compSets[i] < compSets[j]: # 当前用户为子集（先判断当前用户没被移除，再判断子集）\n",
    "                    tops.remove(i)\n",
    "                elif compSets[i] > compSets[j]: # 后续被检查的用户j是否为子集\n",
    "                    tops.remove(j)\n",
    "        return list(tops)\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        f = [(i, set(cmp)) for i, cmp in enumerate(favoriteCompanies)]\n",
    "        f.sort(key=lambda x: -len(x[1]))\n",
    "        ans = [f[0][0]]\n",
    "        for i in range(1, len(f)):\n",
    "            for j in range(i):\n",
    "                if f[i][1] & f[j][1] == f[i][1]:\n",
    "                    break\n",
    "            else:\n",
    "                ans.append(f[i][0])\n",
    "        return sorted(ans)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        res = list(range(len(favoriteCompanies)))\n",
    "        set_list = [set(i) for i in favoriteCompanies]\n",
    "        for i, com_set in enumerate(set_list):\n",
    "            for j in set_list:\n",
    "                if com_set < j:\n",
    "                    res.remove(i)\n",
    "                    break\n",
    "        return res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "\n",
    "\n",
    "        n = len(favoriteCompanies)\n",
    "        compSets = [set(favList) for favList in favoriteCompanies]\n",
    "\n",
    "        tops = set(range(n))\n",
    "\n",
    "        for i in range(n):\n",
    "\n",
    "            if i not in tops: continue\n",
    "\n",
    "            for j in range(i + 1, n):\n",
    "\n",
    "                if j not in tops: continue\n",
    "\n",
    "                if i in tops and compSets[i] < compSets[j]:\n",
    "                    tops.remove(i)\n",
    "                elif compSets[i] > compSets[j]:\n",
    "                    tops.remove(j)\n",
    "\n",
    "        return list(tops)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        compSets = [set(favList) for favList in favoriteCompanies]\n",
    "        tops = set(range(n))\n",
    "\n",
    "        for i in range(n):\n",
    "            if i not in tops: continue\n",
    "            for j in range(i + 1, n):\n",
    "                if j not in tops: continue\n",
    "                if i in tops and compSets[i] < compSets[j]:\n",
    "                    tops.remove(i)\n",
    "                elif compSets[i] > compSets[j]:\n",
    "                    tops.remove(j)\n",
    "        return list(tops)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        ans=[]\n",
    "        for i in range(len(favoriteCompanies)):\n",
    "            flag=0\n",
    "            for j in range(len(favoriteCompanies)):\n",
    "                if i!=j:\n",
    "                    if set(favoriteCompanies[i]) | set(favoriteCompanies[j])==set(favoriteCompanies[j]):\n",
    "                        flag=1\n",
    "                        break\n",
    "            if flag==0:\n",
    "                ans.append(i)\n",
    "        return ans\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        compSets = [set(favList) for favList in favoriteCompanies] # list转化为set，节省后续时间\n",
    "        tops = set(range(n)) # 如果一个下标在tops内，说明他此时没被判定为其他用户的子集\n",
    "\n",
    "        for i in range(n):\n",
    "            if i not in tops: continue # 当前用户的清单已是之前的清单的子集了，不用继续考虑他\n",
    "            for j in range(i+1, n): # 与i之前用户的子集关系已经在之前用户的外层循环检查过了，只需往i后检查\n",
    "                if j not in tops: continue\n",
    "                if i in tops and compSets[i] < compSets[j]: # 当前用户为子集（先判断当前用户没被移除，再判断子集）\n",
    "                    tops.remove(i)\n",
    "                elif compSets[i] > compSets[j]: # 后续被检查的用户j是否为子集\n",
    "                    tops.remove(j)\n",
    "        return list(tops)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        counter_arr=[set(f) for f in favoriteCompanies]\n",
    "        res=[]\n",
    "        for i,f in enumerate(favoriteCompanies):\n",
    "            flag=True\n",
    "            for j,counter in enumerate(counter_arr):\n",
    "                if j==i:continue \n",
    "                if all(c in counter for c in f):\n",
    "                    flag=False \n",
    "                    break \n",
    "            if flag:\n",
    "                res.append(i)\n",
    "        return res \n",
    "                     \n",
    "            "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        res = []\n",
    "        n = len(favoriteCompanies)\n",
    "        favoriteCompanies = list(set(f) for f in favoriteCompanies)\n",
    "        for i in range(n):\n",
    "            for j in range(n):\n",
    "                if i != j and favoriteCompanies[i].issubset(\n",
    "                        favoriteCompanies[j]):\n",
    "                    break\n",
    "            else:\n",
    "                res.append(i)\n",
    "        return res\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        scSet = []\n",
    "        for fcs in favoriteCompanies:\n",
    "            scSet.append(set(fcs))\n",
    "        n = len(scSet)\n",
    "        result = []\n",
    "        for i in range(n):\n",
    "            flag = True\n",
    "            for j in range(n):\n",
    "                if(i == j):\n",
    "                    continue\n",
    "                if(scSet[i] & scSet[j] == scSet[i]):\n",
    "                    flag = False\n",
    "                    break\n",
    "            if(flag):\n",
    "                result.append(i)\n",
    "        return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        compSets = [set(favList) for favList in favoriteCompanies] # list转化为set，节省后续时间\n",
    "        tops = set(range(n)) # 如果一个下标在tops内，说明他此时没被判定为其他用户的子集\n",
    "\n",
    "        for i in range(n):\n",
    "            if i not in tops: continue # 当前用户的清单已是之前的清单的子集了，不用继续考虑他\n",
    "            for j in range(i+1, n): # 与i之前用户的子集关系已经在之前用户的外层循环检查过了，只需往i后检查\n",
    "                if j not in tops: continue\n",
    "                if i in tops and compSets[i] < compSets[j]: # 当前用户为子集（先判断当前用户没被移除，再判断子集）\n",
    "                    tops.remove(i)\n",
    "                elif compSets[i] > compSets[j]: # 后续被检查的用户j是否为子集\n",
    "                    tops.remove(j)\n",
    "        return list(tops)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        res = []\n",
    "        n = len(favoriteCompanies)\n",
    "        favoriteCompanies = list(set(f) for f in favoriteCompanies)\n",
    "        for i in range(n):\n",
    "            for j in range(n):\n",
    "                if i!=j and favoriteCompanies[i].issubset(favoriteCompanies[j]):\n",
    "                    break\n",
    "            else:\n",
    "                res.append(i)\n",
    "\n",
    "\n",
    "        return res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        ans = []\n",
    "        n = len(favoriteCompanies)\n",
    "        giad = [set(i) for i in favoriteCompanies]\n",
    "        tops = set(range(n))\n",
    "        for i in range(n):\n",
    "            if i not in tops: continue;\n",
    "            for j in range(i+1, n):\n",
    "                if j not in tops: continue;\n",
    "                if i in tops and giad[i] < giad[j]:\n",
    "                    tops.remove(i)\n",
    "                elif giad[i] > giad[j]:\n",
    "                    tops.remove(j)\n",
    "        return list(tops)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        compSets = [set(favList) for favList in favoriteCompanies] # list转化为set，节省后续时间\n",
    "        tops = set(range(n)) # 如果一个下标在tops内，说明他此时没被判定为其他用户的子集\n",
    "\n",
    "        for i in range(n):\n",
    "            if i not in tops: continue # 当前用户的清单已是之前的清单的子集了，不用继续考虑他\n",
    "            for j in range(i+1, n): # 与i之前用户的子集关系已经在之前用户的外层循环检查过了，只需往i后检查\n",
    "                if j not in tops: continue\n",
    "                if i in tops and compSets[i] < compSets[j]: # 当前用户为子集（先判断当前用户没被移除，再判断子集）\n",
    "                    tops.remove(i)\n",
    "                elif compSets[i] > compSets[j]: # 后续被检查的用户j是否为子集\n",
    "                    tops.remove(j)\n",
    "        return list(tops)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        ans = []\n",
    "        n = len(favoriteCompanies)\n",
    "        giad = [set(i) for i in favoriteCompanies]\n",
    "        tops = set(range(n))\n",
    "        for i in range(n):\n",
    "            if i not in tops: continue;\n",
    "            for j in range(n):\n",
    "                if i in tops and i != j and giad[i] < giad[j]:\n",
    "                    tops.remove(i)\n",
    "        return list(tops)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        ans=[]\n",
    "        setlist = []\n",
    "        for i in range(len(favoriteCompanies)):\n",
    "            setlist.append(set(favoriteCompanies[i]))\n",
    "        for i in range(len(favoriteCompanies)):\n",
    "            flag=0\n",
    "            for j in range(len(favoriteCompanies)):\n",
    "                if i!=j:\n",
    "                    if setlist[i] | setlist[j]==setlist[j]:\n",
    "                        flag=1\n",
    "                        break\n",
    "            if flag==0:\n",
    "                ans.append(i)\n",
    "        return ans\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        compSets = [set(favList) for favList in favoriteCompanies] # list转化为set，节省后续时间\n",
    "        tops = set(range(n)) # 如果一个下标在tops内，说明他此时没被判定为其他用户的子集\n",
    "\n",
    "        for i in range(n):\n",
    "            if i not in tops: continue # 当前用户的清单已是之前的清单的子集了，不用继续考虑他\n",
    "            for j in range(i+1, n): # 与i之前用户的子集关系已经在之前用户的外层循环检查过了，只需往i后检查\n",
    "                if j not in tops: continue\n",
    "                if i in tops and compSets[i] < compSets[j]: # 当前用户为子集（先判断当前用户没被移除，再判断子集）\n",
    "                    tops.remove(i)\n",
    "                elif compSets[i] > compSets[j]: # 后续被检查的用户j是否为子集\n",
    "                    tops.remove(j)\n",
    "        return list(tops)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        idx = [i for i in range(len(favoriteCompanies))]\n",
    "        idx.sort(key=lambda i: len(favoriteCompanies[i]))  # [3, 1, 4, 2, ...]\n",
    "        ans = []\n",
    "        for i in range(len(idx) - 1, -1, -1):\n",
    "            is_subset = False\n",
    "            for j in range(i + 1, len(idx)):\n",
    "                if set(favoriteCompanies[idx[i]]).issubset(set(favoriteCompanies[idx[j]])):  # 是子集，则走下一个i\n",
    "                    is_subset = True\n",
    "                    break\n",
    "            if not is_subset:\n",
    "                ans.append(idx[i])\n",
    "        ans.sort()\n",
    "        return ans"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        compSets = [set(favList) for favList in favoriteCompanies]\n",
    "\n",
    "        tops = set(range(n))\n",
    "\n",
    "        for i in range(n):\n",
    "\n",
    "            if i not in tops: continue\n",
    "\n",
    "            for j in range(i + 1, n):\n",
    "\n",
    "                if j not in tops: continue\n",
    "\n",
    "                if i in tops and compSets[i] < compSets[j]:\n",
    "                    tops.remove(i)\n",
    "                elif compSets[i] > compSets[j]:\n",
    "                    tops.remove(j)\n",
    "\n",
    "        return list(tops)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        compSets = [set(favList) for favList in favoriteCompanies] # list转化为set，节省后续时间\n",
    "        tops = set(range(n)) # 如果一个下标在tops内，说明他此时没被判定为其他用户的子集\n",
    "\n",
    "        for i in range(n):\n",
    "            if i not in tops: continue # 当前用户的清单已是之前的清单的子集了，不用继续考虑他\n",
    "            for j in range(i+1, n): # 与i之前用户的子集关系已经在之前用户的外层循环检查过了，只需往i后检查\n",
    "                if j not in tops: continue\n",
    "                if i in tops and compSets[i] < compSets[j]: # 当前用户为子集（先判断当前用户没被移除，再判断子集）\n",
    "                    tops.remove(i)\n",
    "                elif compSets[i] > compSets[j]: # 后续被检查的用户j是否为子集\n",
    "                    tops.remove(j)\n",
    "        return list(tops)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        hashset = [set(f) for f in favoriteCompanies]\n",
    "        return [i for i,j in enumerate([reduce(lambda x,y: x and y, [(not (h!=g and h.issubset(g))) for g in hashset]) for h in hashset]) if j]\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        companies = [set(each) for each in favoriteCompanies]\n",
    "        ans = []\n",
    "        for i, x in enumerate(companies):\n",
    "            flag = 0\n",
    "            for j, y in enumerate(companies):\n",
    "                if i == j:\n",
    "                    continue\n",
    "                if x & y == x:\n",
    "                    flag = 1\n",
    "                    break\n",
    "            if flag == 0:\n",
    "                ans.append(i)\n",
    "        return ans"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, f: List[List[str]]) -> List[int]:\n",
    "        ans = []\n",
    "        f = [set(x) for x in f]\n",
    "        for i, x in enumerate(f):\n",
    "            ok = True\n",
    "            for j, y in enumerate(f):\n",
    "                if i == j: continue\n",
    "                if x & y == x:\n",
    "                    ok = False\n",
    "                    break\n",
    "            if ok: ans.append(i)\n",
    "        return ans"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        fcl = []\n",
    "        for fc in favoriteCompanies:\n",
    "            fcl.append(set(fc))\n",
    "\n",
    "        res = []\n",
    "        for i in range(len(fcl)):\n",
    "            is_subset = False\n",
    "            for j in range(len(fcl)):\n",
    "                if i != j and fcl[i].issubset(fcl[j]):\n",
    "                    is_subset = True\n",
    "                    break\n",
    "            if not is_subset:\n",
    "                res.append(i)\n",
    "\n",
    "        return res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        res = set(range(n))\n",
    "        favl = [set(fav) for fav in favoriteCompanies]\n",
    "        for i in range(n):\n",
    "            if i not in res:\n",
    "                continue\n",
    "            for j in range(i+1, n):\n",
    "                if j not in res:\n",
    "                    continue\n",
    "                if favl[i] > favl[j]:\n",
    "                    res.remove(j)\n",
    "                elif i in res and favl[i] < favl[j]:\n",
    "                    res.remove(i)\n",
    "        return list(res)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, fc: List[List[str]]) -> List[int]:\n",
    "        res = []\n",
    "        for p, companies in enumerate(fc):\n",
    "            if all(not set(companies).issubset(set(c)) for c in fc if c != companies): res.append(p)\n",
    "        return res\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        #思路：将所有的用户设定为一个集合，每当检测到某一个用户属于另一个用户的子集，就将该用户移出。同时通过在循环中1跳过已经被判定为是他人子集的用户来加快判断速度。\n",
    "        n = len(favoriteCompanies)\n",
    "        comSets = [set(favList) for favList in favoriteCompanies]   #将字符串转化为集合set\n",
    "        tops = set(range(n))    #创建用户集合\n",
    "        for i in range(n):\n",
    "            if i not in tops:\n",
    "                continue\n",
    "            for j in range(i+1,n):\n",
    "                if j not in tops:\n",
    "                    continue\n",
    "                if i in tops and comSets[i] < comSets[j]:\n",
    "                    tops.remove(i)\n",
    "                elif comSets[i] > comSets[j]:\n",
    "                    tops.remove(j)\n",
    "        return list (tops)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        return [i for i, f in enumerate(favoriteCompanies) if not any(set(c) > set(f) for c in favoriteCompanies)]\n",
    "\n",
    "                \n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "         fav_set=[set(mo) for mo in favoriteCompanies]\n",
    "         ans=[]\n",
    "         for i,x in enumerate(fav_set):\n",
    "             flag=0\n",
    "             for j,y in enumerate(fav_set):\n",
    "                if i==j:\n",
    "                  continue  \n",
    "                if x&y==x:\n",
    "                  flag=1\n",
    "                  break\n",
    "             if flag==0:\n",
    "                ans.append(i)\n",
    "         return ans       "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        ans=[]\n",
    "        n=len(favoriteCompanies)\n",
    "        arr=[0]*n\n",
    "        mp={}\n",
    "        p=0\n",
    "        for x in favoriteCompanies:\n",
    "            for y in x:\n",
    "                if y not in mp:\n",
    "                    mp[y]=p\n",
    "                    p+=1\n",
    "        for i,x in enumerate(favoriteCompanies):\n",
    "            for y in x:\n",
    "                arr[i]+=2**mp[y]\n",
    "\n",
    "\n",
    "        for i in range(n):\n",
    "            check=True\n",
    "            for j in range(n):\n",
    "                if i==j:\n",
    "                    continue\n",
    "                if arr[i]|arr[j]==arr[j]:\n",
    "                    check=False\n",
    "                    break\n",
    "            if check:\n",
    "                ans.append(i)\n",
    "        return ans"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        table = {}\n",
    "        n = len(favoriteCompanies)\n",
    "        ans = []\n",
    "        for i in range(n):\n",
    "            for c in favoriteCompanies[i]:\n",
    "                if c not in table:\n",
    "                    table[c] = 1<<i\n",
    "                else:\n",
    "                    table[c] = table[c]|(1<<i)\n",
    "        for i in range(n):\n",
    "            res = -1\n",
    "            for c in favoriteCompanies[i]:\n",
    "                res = res & table[c]\n",
    "            if res==1<<i:\n",
    "                ans.append(i)\n",
    "        return ans\n",
    "                \n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, f: List[List[str]]) -> List[int]:\n",
    "        n = len(f)\n",
    "        ans = []\n",
    "        for i in range(n):\n",
    "            s1 = set(f[i])\n",
    "            yes = True\n",
    "            for j in range(n):\n",
    "                if i == j:\n",
    "                    continue\n",
    "                s2 = set(f[j])\n",
    "                if s1 & s2 == s1:\n",
    "                    yes = False\n",
    "                    break\n",
    "            if yes:\n",
    "                ans.append(i)\n",
    "        return ans"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        s = []\n",
    "        fn = len(favoriteCompanies)\n",
    "        for x in favoriteCompanies:\n",
    "            s += x\n",
    "        d = dict()\n",
    "        n = len(s)\n",
    "        for i in range(n):\n",
    "            d[s[i]] = i\n",
    "        fc = [[sorted([d[y] for y in favoriteCompanies[i]]), i] for i in range(fn)]\n",
    "        fc.sort(key=lambda i:len(i[0]))\n",
    "        j = 1\n",
    "        ret = [0] * fn\n",
    "        print(fc)\n",
    "        for i in range(fn):\n",
    "            lst = fc[i][0]\n",
    "            cnt = len(lst)\n",
    "            while j < fn and len(fc[j][0]) == cnt:\n",
    "                j += 1\n",
    "            if j >= fn:\n",
    "                break\n",
    "            first = lst[0]\n",
    "            for k in range(j, fn):\n",
    "                lst2 = fc[k][0]\n",
    "                cnt2 = len(lst2)\n",
    "                l, r = 0, cnt2 - cnt\n",
    "                while l <= r:\n",
    "                    m = l + r >> 1\n",
    "                    if lst2[m] >= first:\n",
    "                        r = m - 1\n",
    "                    else:\n",
    "                        l = m + 1\n",
    "                if l < cnt2 and lst2[l] == first:\n",
    "                    # print(i, fc[i], l)\n",
    "                    k1, k2 = 0, l\n",
    "                    while k1 < cnt and k2 < cnt2:\n",
    "                        if lst[k1] == lst2[k2]:\n",
    "                            k1 += 1\n",
    "                            k2 += 1\n",
    "                        elif lst[k1] > lst2[k2]:\n",
    "                            k2 += 1\n",
    "                        else:\n",
    "                            break\n",
    "                    if k1 == cnt:\n",
    "                        ret[fc[i][1]] = 1\n",
    "                        break\n",
    "        return [i for i in range(fn) if ret[i] == 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        companies = dict()\n",
    "        index = 0\n",
    "        for i in favoriteCompanies:\n",
    "            for s in i:\n",
    "                if s not in companies.keys():\n",
    "                    companies[s] = index\n",
    "                    index += 1\n",
    "\n",
    "        favoriteMask = []\n",
    "        for i in favoriteCompanies:\n",
    "            mask = 0\n",
    "            for s in i:\n",
    "                mask = mask | 1 << companies[s]\n",
    "            favoriteMask.append(mask)\n",
    "\n",
    "        #print(favoriteMask)\n",
    "        ret = []\n",
    "        for i in range(len(favoriteMask)):\n",
    "            is_covered = False\n",
    "            for j in range(len(favoriteMask)):\n",
    "                if i != j:\n",
    "                    if favoriteMask[j] & favoriteMask[i] == favoriteMask[i]:\n",
    "                        is_covered = True\n",
    "                        break\n",
    "            if not is_covered:\n",
    "                ret.append(i)\n",
    "        \n",
    "        return ret"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        def is_subset(a, others):\n",
    "            for b in others:\n",
    "                if a.issubset(b[0]):\n",
    "                    return True\n",
    "            return False\n",
    "\n",
    "        favoriteCompanies = [[set(e), index] for index, e in enumerate(favoriteCompanies)]\n",
    "        favoriteCompanies.sort(key=lambda x: len(x[0]))\n",
    "        print(favoriteCompanies)\n",
    "        res = []\n",
    "        for i in range(len(favoriteCompanies)):\n",
    "            if not is_subset(favoriteCompanies[i][0], favoriteCompanies[i + 1:]) or i == len(favoriteCompanies) - 1:\n",
    "                res.append(favoriteCompanies[i][1])\n",
    "        return sorted(res)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        res = []\n",
    "        n = len(favoriteCompanies)\n",
    "        favoriteCompanies = list(set(f) for f in favoriteCompanies)\n",
    "        print(favoriteCompanies)\n",
    "        for i in range(n):\n",
    "            for j in range(n):\n",
    "                if i != j and favoriteCompanies[i].issubset(\n",
    "                        favoriteCompanies[j]):\n",
    "                    break\n",
    "            else:\n",
    "                res.append(i)\n",
    "        return res\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        res = []\n",
    "        for i in range(n):\n",
    "            favoriteCompanies[i] = (set(favoriteCompanies[i]), i)\n",
    "        favoriteCompanies.sort(key = lambda x:-len(x[0]))\n",
    "        \n",
    "        for i in range(n):\n",
    "            flag = True\n",
    "            for j in range(n):\n",
    "                if i != j:\n",
    "                    if not (favoriteCompanies[i][0] - favoriteCompanies[j][0]):\n",
    "                        flag = False\n",
    "            if flag:\n",
    "                res.append(favoriteCompanies[i][1])\n",
    "\n",
    "        res.sort()\n",
    "        return res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "# class Solution:\n",
    "#     def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "#         res = []\n",
    "#         def panduan(father, son):\n",
    "#             res_ = []\n",
    "#             for j, father_ in enumerate(father):\n",
    "#                 for i, son_ in enumerate(son):\n",
    "#                     if son_ not in father_:\n",
    "#                         return res_                   \n",
    "#                     if son_ in father_ and son_ == son[-1]:\n",
    "#                         print(son_)\n",
    "#                         res_.append(j)   \n",
    "#             return res_                 \n",
    "        \n",
    "#         for i  in range(len(favoriteCompanies)):\n",
    "#             # print(panduan(favoriteCompanies,favoriteCompanies[i]))\n",
    "#             res.append(panduan(favoriteCompanies,favoriteCompanies[i]))\n",
    "        \n",
    "        # return res\n",
    "\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        length = len(favoriteCompanies)\n",
    "        for i in range(length):\n",
    "            favoriteCompanies[i] = set(favoriteCompanies[i])\n",
    "        res = []\n",
    "        for i in range(length):\n",
    "            pattern = favoriteCompanies[i]\n",
    "            for flist in favoriteCompanies:\n",
    "                if pattern < flist: break\n",
    "            else:\n",
    "                res.append(i)\n",
    "        return res\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "# class Solution:\n",
    "#     def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "#         res = []\n",
    "#         def panduan(father, son):\n",
    "#             res_ = []\n",
    "#             for j, father_ in enumerate(father):\n",
    "#                 for i, son_ in enumerate(son):\n",
    "#                     if son_ not in father_:\n",
    "#                         return res_                   \n",
    "#                     if son_ in father_ and son_ == son[-1]:\n",
    "#                         print(son_)\n",
    "#                         res_.append(j)   \n",
    "#             return res_                 \n",
    "        \n",
    "#         for i  in range(len(favoriteCompanies)):\n",
    "#             # print(panduan(favoriteCompanies,favoriteCompanies[i]))\n",
    "#             res.append(panduan(favoriteCompanies,favoriteCompanies[i]))\n",
    "        \n",
    "        # return res\n",
    "\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        length = len(favoriteCompanies)\n",
    "        for i in range(length):\n",
    "            favoriteCompanies[i] = set(favoriteCompanies[i])\n",
    "        res = []\n",
    "        for i in range(length):\n",
    "            pattern = favoriteCompanies[i]\n",
    "            for flist in favoriteCompanies:\n",
    "                if pattern < flist: break\n",
    "            else:\n",
    "                res.append(i)\n",
    "        return res\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import List\n",
    "import collections\n",
    "\n",
    "class Solution:\n",
    "    def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:\n",
    "        n = len(favoriteCompanies)\n",
    "        for i in range(n):\n",
    "            favoriteCompanies[i] = set(favoriteCompanies[i])\n",
    "        ans = []\n",
    "        for i in range(n):\n",
    "            for j in range(n):\n",
    "                if i != j and favoriteCompanies[i] < favoriteCompanies[j]:\n",
    "                    break\n",
    "            else:\n",
    "                ans.append(i)\n",
    "        return ans\n",
    "\n",
    "        "
   ]
  }
 ],
 "metadata": {},
 "nbformat": 4,
 "nbformat_minor": 2
}
